<?php
namespace app\yiluqianxing\home;

use think\Controller;
use think\Db;
use think\Request;
//点数相关
class Xiaochengxupoint extends Controller{

    //获取用户剩余点数
    function getUserPoint($openid=''){
        $get=Db::table('dp_ylqx_uploads')
            ->where(['openid'=>$openid,'status'=>1])
            ->sum('plus_point');
        $spend=Db::table('dq_ylqx_order')
            ->where('openid',$openid)
            ->sum('point');
        $userpoint=$get-$spend;

        return $userpoint;
    }

    //获取所有用户点数排行

    //

}